#pragma once


struct SqlRequest
{
	std::wstring groupId;
	std::wstring requestId;
	std::wstring request;

	bool empty() const { return groupId.empty() && requestId.empty() && request.empty(); }
	void clear() { groupId.clear(); requestId.clear(); request.clear(); }
};

struct SqlResponse
{
	typedef std::vector<std::wstring> Row;
	typedef std::vector<Row> Rows;

	struct Table
	{
		Row header;
		Rows rows;

		bool empty() const { return header.empty() && rows.empty(); }
		void clear() { header.clear(); rows.clear(); }
	};

	std::wstring requestId;
	std::wstring errorCode;
	Table responseTable;

	bool empty() const { return requestId.empty() && errorCode.empty() && responseTable.empty(); }
	void clear() { requestId.clear(); errorCode.clear(); responseTable.clear(); }
};
